package com.study.designPattern.prototype;

/**
 * Created by HBZ on 2017/5/17.
 */
public class Test {
    public static void main(String[] args) {
        Prototype pro = new ConcretePrototype("prototype");
        Prototype pro2 = (Prototype)pro.clone();
        System.out.println(pro.getName());
        System.out.println(pro2.getName());

        Prototype pro3=new Prototype();
        pro3.setName("a");
        Prototype pro4=(Prototype)pro3.clone();
        System.out.println(pro3.getName());
        System.out.println(pro4.getName());
    }
}
